package org.example.base;

import redis.clients.jedis.Jedis;

import java.util.List;
import java.util.Set;

public class TestSet {
    public static void main(String[] args) {
        Jedis jedis = new Jedis("127.0.0.1", 6379);
        jedis.sadd("name","wukai");
        jedis.sadd("name","wukai2");
        jedis.sadd("name","wukai3");
        jedis.sadd("name","wukai4");
        jedis.sadd("name","wukai5");
        jedis.sadd("huangyuxi","wukai5","wukai4","1","b","c");

//        System.out.println(jedis.scard("name"));
//        System.out.println(jedis.spop("name"));
//        System.out.println(jedis.srem("name","wukai2"));
//        System.out.println(jedis.smembers("name"));
//        System.out.println(jedis.sismember("name","wukai2"));
        System.out.println(jedis.sdiff("name","huangyuxi"));
        System.out.println(jedis.sinter("name","huangyuxi"));
        System.out.println(jedis.sunion("name","huangyuxi"));
    }
}
